package fun.sssdnsy.mybatis.executor.statement;

import fun.sssdnsy.mybatis.session.ResultHandler;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;

/**
 * @Desc 语句处理器
 * @Author pengzh
 * @Since 2023-03-16
 */
public interface StatementHandler {

    Statement prepare(Connection connection) throws SQLException;

    void parameterize(Statement statement) throws SQLException;

    <E> List<E> query(Statement statement, ResultHandler resultSetHandler) throws SQLException;

}
